package com.etime.shyzuul.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.etime.shyzuul.pojo.SysRoleRight;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 初始化权限数据dao层
 */
@Repository
public interface SysRoleRightMapper extends BaseMapper<SysRoleRight> {

    /**
     * 初始化数据接口权限数据。只查询数据接口的权限数据(需要授权的数据接口)
     * @return
     */
    @Select("select rrid,roleid,a.funid,b.funurl,b.funneedlogin " +
            " from sysroleright a " +
            " right outer join sysfunction b on a.funid=b.funid " +
            " where b.funtype=3 and b.funneedlogin=1 and b.funstate=1 ")
    List<SysRoleRight> selectSysRoleRightList();
}
